import request from '../../../utils/request'

// 获取设备列表
export function getDeviceList(params) {
  return request({
    url: '/cockpitapi/home/getDeviceList',
    method: 'post',
    params
  })
}
export function getHezeCollectList(params) {
  return request({
    url: '/cockpitapi/home/getHezeCollectList',
    method: 'post',
    params
  })
}

export function getIcVideoCollectList(params) {
  return request({
    url: '/cockpitapi/home/getIcVideoCollectList',
    method: 'post',
    params
  })
}

export function getWdtecCollectList(params) {
  return request({
    url: '/cockpitapi/home/getWdtecCollectList',
    method: 'post',
    params
  })
}

export function getSjkjCollectList(params) {
  return request({
    url: '/cockpitapi/home/getSjkjCollectList',
    method: 'post',
    params
  })
}

export function getVogmcHistory24() {
  return request({
    url: '/cockpitapi/home/getVogmcHistory24',
    method: 'post'
  })
}

// 获取设备详情
export function getDeviceDetail(id) {
  return request({
    url: `/device/detail/${id}`,
    method: 'get'
  })
}

// 获取设备状态
export function getDeviceStatus() {
  return request({
    url: '/device/status',
    method: 'get'
  })
}

// 获取设备数据
export function getDeviceData(params) {
  return request({
    url: '/device/data',
    method: 'get',
    params
  })
} 

export function getDeviceLocation(url) {
  return request({
    url: url,
    method: 'post'
  })
}

export function getIdentificationStatistics(params) {
  return request({
    url: '/cockpitapi/home/getIdentificationStatistics',
    method: 'post'
  })
}

export function getLiveInfo() {
  return request({
    url: '/cockpitapi/home/getLiveInfo',
    method: 'post'
  })
}

export function getClassifyStatistics(params) {
  return request({
    url: '/cockpitapi/home/getClassifyStatistics',
    method: 'post'
  })
}
export function getEnvironmentalMonitoring(params) {
  return request({
    url: '/cockpitapi/home/getEnvironmentalMonitoring',
    method: 'post'
  })
}

// 获取物种观测成果
export function getWZGCCG(code) {
  return request({
    url: `/cockpitapi/home/getWZGCCG?code=${code}`,
    method: 'post'
  })
}

// 获取最新观测成果
export function getNewIdentify(create_time) {
  return request({
    url: `/cockpitapi/home/getNewIdentify?create_time=${create_time}`,
    method: 'post'
  })
}

// 
export function allGarden(params) {
  return request({
    url: '/api/leader/allGarden',
    method: 'get',
    params
  })
}

export function touristData(params) {
  return request({
    url: '/api/leader/tourist/touristNow',
    method: 'post',
    params
  })
}